import request from '@/utils/request'

/**
 *  优惠券-发放
 * @param data
 */
export function coupon(data) {
  return request({
    url: '/coupon',
    method: 'post',
    data
  })
}

/**
 *  申请开发票 invoice
 * @param data
 */
export function invoice(data) {
  return request({
    url: '/invoice',
    method: 'post',
    data
  })
}

/**
 *  审核发票的状态
 * @param data
 */
export function invoiceStatus(data) {
  return request({
    url: '/invoice/status',
    method: 'put',
    data
  })
}

/**
 *  更新发票的开票信息
 * @param data
 */
export function invoiceDetail(data) {
  return request({
    url: '/invoice/detail',
    method: 'put',
    data
  })
}

/**
 *  更新审核通过的物流信息 invoiceTransport
 * @param data
 */
export function invoiceTransport(data) {
  return request({
    url: '/invoice/transport',
    method: 'put',
    data
  })
}


/**
 *  获取发票的列表 invoiceQuery
 * @param data
 */
export function invoiceQuery(data) {
  return request({
    url: '/invoice/query',
    method: 'get',
    params:data
  })
}



/**
 * 充值
 * @param data
 */
export function charge(data) {
  return request({
    url: '/charge',
    method: 'post',
    data
  })
}

/**
 * 充值记录查询   queryCharge
 * @param data
 */
export function queryCharge(data) {
  return request({
    url: '/charge/query',
    method: 'get',
    params:data
  })
}

/**
 * 消费记录  queryRecord    url: '/seo/query.record',
 * @param data
 */
export function seoQuery(data) {
  return request({
    url: '/seo/query',
    method: 'get',
    params:data
  })
}


/**
 * 退款申请 refund
 * @param data
 */
export function refund(data) {
  return request({
    url: '/refund',
    method: 'post',
    data
  })
}

/**
 * 更新退款结果 refundResult
 * @param data
 */
export function refundResult(data) {
  return request({
    url: '/refund/result',
    method: 'put',
    data
  })
}

/**
 * 查询退款列表  refundQuery
 * @param data
 */
export function refundQuery(data) {
  return request({
    url: '/refund/query',
    method: 'get',
    params:data
  })
}

/**
 * 查询退款详情  refundDetail
 * @param data
 */
export function refundDetail(data) {
  return request({
    url: '/refund/detail',
    method: 'get',
    params:data
  })
}


/**
 * 优惠券-查询列表  couponQuery
 * @param data
 */
export function couponQuery(data) {
  return request({
    url: '/coupon/query',
    method: 'get',
    params:data
  })
}

